#pragma once
#ifndef _CAttribute_h_LW_
#define _CAttribute_h_LW_

#include <boost/shared_array.hpp>
#include <QString>
#include <QList>
#include <windows.h>
#include <vector>

struct ResidentAttrHdr;
struct NonResidentAttrHdr;
class CMFT;

struct Range {
	Range(UINT64 _start,UINT64 _end) 
		:start(_start),end(_end) {};
	UINT64 start;
	UINT64 end;
};

class CAttribute
{
public:
	CAttribute(CMFT *parent);
	~CAttribute(void);
	UINT64 size();
	QString name() const;
	void read( UINT64 startByte, UINT64 len, char* buffer );
	QList<Range> getClusterRange();
	//public data !!EVIL!!
	bool isResident;
	CMFT * parentMFT;
	QList<Range> clusterRange;
	QList<boost::shared_array<char>> attrDat;
	ResidentAttrHdr * resAttr;
	NonResidentAttrHdr * nresAttr;

};
#endif // _CAttribute_h_LW_
